<!DOCTYPE html>
<html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>新增或修改用户</title>

<style>
#memo{
	border:none;
	border:1px solid #dedede;
}
.form-horizontal .control-label{
	padding-top:2px;
}
.form-horizontal .controls{
	margin-left:170px;
}
.controls .textbox.combo{
	width:206px !important;
}
#addUserForm input{
	width:208px;
}
.controls{
	width:330px;
}
.form-horizontal .control-group{
	margin-bottom:15px;
}
.span5{
    	width:470px;
    }
</style>
<script type="text/javascript">
var link_id = '${addUser.link_id}';
var link_name = '${addUser.link_name}';
var userType = '${addUser.user_type}';
</script>
<style>
.input-medium{
	width:208px;
}
.select2{
	width:208px !important;
}

</style>
</head>

<body>
	<form:form id="addUserForm" method="post" modelAttribute="addUser" cssClass="form-horizontal">
		<form:hidden path="id" id="id"/>

		<div class="row">
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="login_name" path="login_name">登录名：</form:label>
					<div class="controls">
						<form:input id="login_name" path="login_name" class="input-medium"
							check-type="required maxLength" required-message="登录名称不能为空"
							max-length="40" maxLength-message="登录名称不能超过40个字符!" />
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="user_name" path="user_name">用户名：</form:label>
					<div class="controls">
						<form:input id="user_name" class="input-medium" path="user_name"
							check-type="required maxLength" required-message="用户名不能为空"
							max-length="40" maxLength-message="用户名不能超过40个字符!" />
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="area_id" path="area_id">车辆管辖区域：</form:label>
					<div class="controls">
						<form:input id="area_id" class="input-medium" path="area_id"/>
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>

			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="role_id" path="role_id">所属角色：</form:label>
					<div class="controls">
						<form:input id="role_id" path="role_id" class="input-medium"/>
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="user_type" path="user_type">用户类型：</form:label>
					<div class="controls">
						<%-- <form:input type="hidden" id="user_type" class="input-medium" path="user_type"/> --%>
						<form:select id="user_type" type="text" name="user_type" class="input-medium" path="user_type">
    					<option value='2' ${addUser.user_type==2?"selected ='selected'":""}>企业</option>
    					<option value='3' ${addUser.user_type==3?"selected ='selected'":""}">驾驶员</option>
    				</form:select>
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>

			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="link_id" path="link_id">用户类型名称：</form:label>
					<div class="controls">
						<%-- <form:input type="hidden" id="link_name"  class="input-medium"/> --%>
						<form:select id="link_id" type="text" class="userInput fl" path="link_id">
    					</form:select>
						<font style="color:#f00;">*</font>
					</div>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="contacts" path="contacts">联系人：</form:label>
					<div class="controls">
						<form:input id="contacts" class="input-medium" path="contacts"/>
					</div>
				</div>
			</div>

			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="contacts_number" path="contacts_number">联系电话：</form:label>
					<div class="controls">
						<form:input id="contacts_number" path="contacts_number" class="input-medium"/>
					</div>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="memo" path="memo">备注：</form:label>
					<div class="controls">
						<form:textarea id="memo" path="memo"  class="input-medium" style='width:208px'/>
					</div>
				</div>
			</div>
			<div id="passDiv" class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="memo" path="memo">默认密码：</form:label>
					<div class="controls">
						<label style="color:red;margin-top: 2px;font-size: 14px;">123456</label>
					</div>
				</div>
			</div>
		
		</div>
	</form:form>
	
	<script src="<%=basePath %>resources/js/system/user/addUserForm.js"></script>
</body>
</html>